import static org.junit.Assert.*;

import org.junit.Test;


public class distanceToNextTest {

	@Test
	public void test() {
		Ship ship = new Ship();
		Timeline timeline = new Timeline(ship);
		timeline.distanceToNext();
		assertEquals(timeline.getDistToNext(), 0);
		timeline.setCurrentStep(2);
		timeline.distanceToNext();
		assertEquals(timeline.getDistToNext(), 1);
		timeline.setCurrentStep(8);
		timeline.distanceToNext();
		assertEquals(timeline.getDistToNext(), 3);
		timeline.setCurrentStep(13);
		timeline.distanceToNext();
		assertEquals(timeline.getDistToNext(), 1);
	}

}
